#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>

int main()
{
  pid_t id = fork();
  if(id)
  {
    while(1)
    {
      printf("I am parent, pid: %d ;ppid: %d\n", getpid(), getppid());
      sleep(1);
    }
  }
  else 
  {
    while(1)
    {
      printf("I am child, pid: %d ;ppid: %d\n", getpid(), getppid());
      sleep(1);
    }
  }
  return 0;
}
